<script>
export default {
  name: "base-select",
  props: {
    selectList: {
      type: Array,
      required: true
    },
    value:{
      type:String,
      required: true
    }
  },
  methods:{
    changeHandler(event){
      this.$emit("input",event.target.value)
    }
  }
}
</script>

<template>
  <select :value="value" @change="changeHandler">
    <option v-for="(item,index) in selectList" :value="item.value" :key="item.id">{{ item.address }}</option>
  </select>
</template>

<style scoped lang="less">
select{
  width: 200px;
  text-align: center;
  font-size: 18px;
}
</style>